package com.shenma.consumer;

import com.shenma.service.TestHessian;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.shenma.service.DubboService;

@RestController
public class Consumer {

	@Autowired
	private DubboService dubboService;
	
	@RequestMapping("/getname/{name}")
	public String testDubbo(@PathVariable String name){
		return dubboService.getName(name+"  kkk");
	}


	@RequestMapping("/testHessian")
	public String testHessian(){
		TestHessian testHessian = new TestHessian();
		testHessian.setCode("001");
		testHessian.setName("bujing");
		return dubboService.testHessian(testHessian);
	}

}
